package visualcbir;

import java.util.ArrayList;

/**
 *
 * @author sheila
 */

public class ModelComposed extends Model{
    private ArrayList<Model> aoModels;
    
    public ModelComposed(){
        aoModels = new ArrayList<Model>();
    }

    public void addModel(Model oModel){
        this.aoModels.add(oModel);
    }

    public Model getModel(int i){
        return this.aoModels.get(i);
    }

    public int getNumModels(){
        return this.aoModels.size();
    }
    public void clearModel(){
        for (int i = 0; i < aoModels.size(); i++) {
            this.aoModels.get(i).clearModel();
            this.aoModels.clear();
        }
        this.deleteObservers();
    }
}